package com.hmyuan.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class Category  implements Serializable{

	private static final long serialVersionUID = 26771538544L;
	
	private Long id;

    private String name;

    private Date createtime;

    private Long parentid;

    private int status;

    private String useraccount;

    private int ordernum;
    
    /**
	 *根据list获取字符串，以第二个参数分割 
	 */
    public static String getNameStringByList(List<Category> ls,String s){
		StringBuffer sb = new StringBuffer();
		for (int i = 0; i < ls.size(); i++) {
			if(i==(ls.size()-1)){
				sb.append(ls.get(i).getName());
			}else{
				sb.append(ls.get(i).getName()).append(s);
			}
		}
		return sb.toString();
	}
    
  //使用数
    private long count;
    
    
    public long getCount() {
		return count;
	}

	public void setCount(long count) {
		this.count = count;
	}

	public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Long getParentid() {
        return parentid;
    }

    public void setParentid(Long parentid) {
        this.parentid = parentid;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getUseraccount() {
        return useraccount;
    }

    public void setUseraccount(String useraccount) {
        this.useraccount = useraccount == null ? null : useraccount.trim();
    }

    public int getOrdernum() {
        return ordernum;
    }

    public void setOrdernum(int ordernum) {
        this.ordernum = ordernum;
    }
}